<template>
<div>
  <el-table
        :data="list"
>
    <el-table-column class-name="status-col" label="订单编号" width="180">
      <template slot-scope="scope" >
        <span>{{scope.row.id}}</span>
      </template>
    </el-table-column>
    <el-table-column class-name="status-col" label="类型" width="100">
      <template slot-scope="scope">
        <span>{{scope.row.businessTypeName}}</span>
      </template>
    </el-table-column>
    <el-table-column class-name="status-col" label="费用" width="80">
      <template slot-scope="scope">
        <span>{{scope.row.freight}}</span>
      </template>
    </el-table-column>
    <el-table-column class-name="status-col" label="系统费用" width="80">
      <template slot-scope="scope">
        <span>{{scope.row.systemFee}}</span>
      </template>
    </el-table-column>
    <el-table-column  class-name="status-col" label="取件地址" width="180">
      <template slot-scope="scope">
        <span>{{scope.row.takeAddressDetails}}</span>
      </template>
    </el-table-column>
    <el-table-column class-name="status-col" label="取件联系电话" width="180">
      <template slot-scope="scope">
        <span>{{scope.row.takeMobile}}</span>
      </template>
    </el-table-column>
    <el-table-column class-name="status-col" label="收货地址" width="180">
      <template slot-scope="scope">
        <span>{{scope.row.deliveryAddressDetails}}</span>
      </template>
    </el-table-column>
    <el-table-column class-name="status-col" label="收货联系电话" width="180">
      <template slot-scope="scope">
        <span>{{scope.row.deliveryMobile}}</span>
      </template>
    </el-table-column>
    <el-table-column class-name="status-col" label="订单时间" width="180">
      <template slot-scope="scope">
        <span>{{scope.row.createTime}}</span>
      </template>
    </el-table-column>
  </el-table>
  <pagination
      v-show="total>0"
      :total="total"
      :page.sync="listQuery.pageIndex"
      :limit.sync="listQuery.pageSize"
      @pagination="getlist"
    />
</div>
</template>

<script>
import { getuserdata } from '@/api/userdata'
import pagination from '@/components/pagination'
export default {
  components: {
    pagination
  },
  data () {
    return {
      list: null,
      total: 0,
      listQuery: {
        pageIndex: 1,
        pageSize: 20
      }
    }
  },
  created () {
    this.getlist()
  },
  methods: {
    getlist () {
      getuserdata(this.listQuery).then(response => {
        this.list = response.data.data
        this.total = response.data.total
      })
    }
  }
}
</script>

<style scoped>
</style>
